package com.enation.app.javashop.api.client;

import com.enation.app.javashop.model.member.dos.MemberReceipt;
import com.enation.app.javashop.model.member.dos.ReceiptHistory;
import com.enation.app.javashop.model.member.vo.ReceiptHistoryVO;
import com.enation.app.javashop.service.member.MemberReceiptManager;
import com.enation.app.javashop.service.member.ReceiptHistoryManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 会员历史发票api
 *
 * @author zh
 * @version v7.0
 * @date 18/7/30 下午8:10
 * @since v7.0
 */
@Api(description = "会员历史发票api")
@RestController
@RequestMapping("/client/members/receipt")
@Validated
@ApiIgnore
public class MembeReceitClientController {

    @Autowired
    private MemberReceiptManager memberReceiptManager;

    @ApiOperation(value = "根据订单号查询发票历史", response = ReceiptHistory.class)
    @GetMapping("/{id}")
    @ApiImplicitParam(name = "order_sn", value = "订单sn", required = true, dataType = "String", paramType = "path")
    public MemberReceipt getModel(@PathVariable("id") Long id) {
        return memberReceiptManager.getModel(id);
    }




}
